import logging

logging.basicConfig(filename='./log.log')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logging.info('info message')
logging.debug('debug info')